var e = require;
var t = module;
var o = exports;
var Adv_skd=require("./Adv_skd");
Object.defineProperty(o, "__esModule", {value: !0});
var n = e("BaseModuleUI"),
    a = e("GlobalParams"),
    i = e("AssetsManager"),
    r = e("RoleSoldierInfo"),
    s = cc._decorator,
    l = s.ccclass,
    c = s.property,
    d = (function (e) {
        function t() {
            var t = (null !== e && e.apply(this, arguments)) || this;
            return (t.hero_sprite = null), (t.hero_name = null), t;
        }
        return (
            __extends(t, e),

            (t.prototype.onDisable = function () {

                Adv_skd.default.instance.hideBannerAd();
                Adv_skd.default.instance.hideGridAdLeft();
                Adv_skd.default.instance.hideGridAdRight();
                Adv_skd.default.instance.hideGridAdTop();
                Adv_skd.default.instance.hideGridAdLeftOne();
                Adv_skd.default.instance.hideGridAdRightOne();
                Adv_skd.default.instance.hideGridAdButtom();

            }),

            (t.prototype.initView = function () {

                Adv_skd.default.instance.hideBannerAd();
                Adv_skd.default.instance.hideGridAdLeft();
                Adv_skd.default.instance.hideGridAdRight();
                Adv_skd.default.instance.hideGridAdTop();
                Adv_skd.default.instance.hideGridAdLeftOne();
                Adv_skd.default.instance.hideGridAdRightOne();
                Adv_skd.default.instance.hideGridAdButtom();
                Adv_skd.default.instance.showGridAdLeft();
                Adv_skd.default.instance.showGridAdRight();
                Adv_skd.default.instance.showGridAdTop();
                Adv_skd.default.instance.showBannerAd();
                Adv_skd.default.instance.showInterstitialAd();

                var e = r.default.Role_info[a.GlobalParams.playerSkinInfo.value.use[0]];
                (this.hero_sprite.spriteFrame = i.default.getInstance().getHeroHeadFrame(e.C_ID)),
                    (this.hero_name.string = (0 == e.C_type ? "近战" : "远程") + "英雄·" + e.C_Name);
            }),
            (t.prototype.OnClick = function (t) {
                switch ((e.prototype.OnClick.call(this, t), t.node.name)) {
                    case "sure_btn":
                        this.node.destroy();
                }
            }),
            __decorate([c(cc.Sprite)], t.prototype, "hero_sprite", void 0),
            __decorate([c(cc.Label)], t.prototype, "hero_name", void 0),
            __decorate([l], t)
        );
    })(n.default);
o.default = d;
